package com.class09.bean_uml;


/**
 * @ClassDescription: 所谓的JavaBean，是指符合java bean规范的类，
 * 1. 类是公共的
 * 2. 有一个无参的公共的构造器
 * 3. 属性私有化，并提供对应的get和set方法
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2024/4/1 16:49
 */
public class Customer {
    private String name;
    private int age;
    private int id;

    public Customer() {

    }

    public void setName(String n) {
        name = n;
    }

    public String getName() {
        return name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setId(int i) {
        id = i;
    }

    public int getId() {
        return id;
    }
}

class TestMain {
    public static void main(String[] args) {
        Customer c = new Customer();
        c.setName("yxy");
        c.setAge(18);
        c.setId(1);
        System.out.println("-------------");
        System.out.println(c.getName());
        System.out.println(c.getAge());
        System.out.println(c.getId());
    }
}
